// export function validatenull(val) {
function getNonDuplicateID(length) {
    let idStr = Date.now().toString(36);
    idStr += Math.random().toString(36).substring(3, length);
    return idStr;
};




function deepClone(obj) {
	let newObj=null;
	try {
		newObj = obj.push ? [] : {};
	} catch (error) {
		newObj = {};
	}
	for (let attr in obj) {
		if (obj[attr] && typeof obj[attr] === 'object') {
			newObj[attr] = deepClone(obj[attr]);
		} else {
			newObj[attr] = obj[attr];
		}
	}
    
	return newObj;
}

export {
    getNonDuplicateID,
    deepClone,
}